import request from '@/utils/request'

export const grabTaskApi = {
    // 获取所有任务
    getTasks() {
        return request.get('/attractions/grab/list')
    },
    // 创建任务
    createTask(data) {
        return request.post('/attractions/grab/create', data)
    },
    // 更新任务
    updateTask(id, data) {
        return request.put(`/attractions/grab/update/${id}`, data)
    },
    // 删除任务
    deleteTask(id) {
        return request.delete(`/attractions/grab/delete/${id}`)
    },
    // 立即执行任务
    executeTask(id) {
        return request.post(`/attractions/grab/${id}/execute`)
    },
}